Skip to content

Make go run fast#2

Open
RobinJadoul wants to merge 1 commit into
balsn:masterfrom
RobinJadoul:faster-go
Open

Make go run fast#2
RobinJadoul wants to merge 1 commit into
balsn:masterfrom
RobinJadoul:faster-go

Conversation

@RobinJadoul

Copy link
Copy Markdown

This speeds up the validity checking in the go solver, and adds a main function so that it can be used directly.
The speedup comes from avoiding more memory allocations and string building, by replacing the binary string check with a count of the leading zeroes of the first 8 hash bytes as uint64 (big endian).
This breaks for difficulty > 64, but that is out of range for any reasonable PoW either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant